﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RemoveStringDuplicated
{
    public static class StringExtension
    {
        public static string RemoveDuplicated(this string input)
        {
            string result = string.Empty;
            
            result += input[0];

            for (int i = 0; i < input.Length; i++)
            {
                bool flag = true;

                for (int j = 0; j < result.Length; j++)
                {
                    if (input[i] == result[j])
                    {
                        flag = false;
                        break;
                    }                    
                }

                if(flag)
                    result += input[i];
            }

            return result;
        }
    }
}
